package com.example.qxfw.nyqx.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.qxfw.common.entity.ny.QhYz;
import com.example.qxfw.nyqx.mapper.QhYzMapper;
import com.example.qxfw.nyqx.service.QhYzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QhYzServiceImpl implements QhYzService {

    @Autowired
    private QhYzMapper qhYzMapper;

    @Override
    public List<QhYz> getList(String factorIndex) {
        return qhYzMapper.selectList(factorIndex);
    }

    @Override
    public Integer update(QhYz qhYz) {
        return qhYzMapper.update(qhYz, Wrappers.<QhYz>lambdaUpdate().eq(QhYz::getFactorindex,qhYz.getFactorindex()));
    }
}
